Repository navigation
Conversation
added 27 commits
November 22, 2026 07:16
…s the thread's state, hash's own copy of crypto's with an engaged flag
…upport's examples name hash's functions
…ch call on every backend
… call on every backend
…rt from the other derivations, and blake3's move named as its copy
…so that GCC 15 at release reads no uninitialized phase in it
…oves every keyed cell enters its own timing guard and every unkeyed one none
… refused call asserts the error of the guard that refuses it
… computes, the pool's for a heavy function and the caller's for a cheap one
…eld pool thread, never a yield loop
…nctions set DIT and which do not
…, bcrypt_verify among the password hashes, and collect.py dates every measurement in UTC and replaces data it cannot keep
… hkdf, pbkdf2, mac and async_pbkdf2 compute, through a Hash2-form probe under their hmac
…state and 1,928 of the blake3 class on 64-bit targets
…t set DIT itself, and take whether BLAKE2b takes a key from the table, the engine checked against it
…avy and cheap forms through one function
…s backend_failure and leaves DIT as found, from clear and from set
…> as SipHash with DIT, and the section names timing_during and the coverage tests' pass from DIT set
…ries the seam and which the timing tests and the coverage support include
…e Botan twin, so clang-tidy finds no unused template
…, test_password, test_info and test_input, which no parameter of the library hides (MSVC C4459 at /WX)
… its first round until the emit, so that at least one call is aborted whatever the scheduler does
…, as readability-trailing-comma asks
…stexpr lambda, which fits a line and needs no trailing comma either way
…d links, and the refusal of OpenSSL on Emscripten never stops a reference config.hpp's __MRDOCS__ block defined every WEBCPP_HASH_HAS_<NAME>, so that hash's own reference documents each. The reference of another library that includes hash (trystero's, read for Emscripten's target) then met the refusal of OpenSSL on Emscripten and BLAKE3's header, which its build does not link. Each definition now sits between push_macro and pop_macro, which keep the build's definition or its absence; hash's doc/Jamfile links every library, so its reference is unchanged but for line numbers. The refusal is guarded by !defined(__MRDOCS__).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every public function of webcpp::hash one of whose inputs is a key, a password or a key derivation's secret input now runs with arm64's DIT set, on the thread that computes it, and returns with the thread's DIT as it found it (proposals:
libraries/hash/openspec/changes/data-independent-timing).detail/timing.hpp: hash's own copy of webcpp::crypto's guard (crypto depends on hash), with anengagedflag for the keyed modes of a digest; astd::source_locationonly where a test defines the seam.mac,hkdf_extract,hkdf_expand,hkdf,pbkdf2,kbkdf,sskdf,x963kdf,blake2b_subkey,argon2id,argon2,scrypt,bcrypt,bcrypt_verify,bcrypt_pbkdfon every backend, Botan's included; keyed BLAKE2b (digest_of,hasher) and blake3's keyed modes by their arguments. Unkeyed hashing and Boost.Hash2's aliases are not guarded (design D2, D3).timing,timing_threads,timing_unseamed), DIT observed set during the computation (timing_during,timing_during_async), one coverage test per backend driven bydoc/capabilities.json(keyed cells enter their own guard first, unkeyed digests none), the asynchronous forms on the computing thread (timing_async,timing_async_botan), Botan's exception path inside a guard (timing_botan_failure).bench/timing.cppandcollect.py --timing: the guard's cost from a release build, marked provisional for the final quiet measurement pass; the pages, the changelog source and AGENTS.md.async_heavycancellation case; MSVC C4459 and clang-tidy fixes in the tests.Verified locally: native clang and gcc-15, wasip2, wasip3, Emscripten (full hash lanes), an arm64 Linux container with HWCAP_DIT, the macOS and Linux lints, MSVC 14.3 and 14.5 (only the documented Wine Boost.JSON stop on seven no-exceptions builds).